<?php 
namespace app\api\validate;

use think\Validate;
use app\api\model\Goods;
use app\api\model\Cart;
use app\api\model\Address;
class BaseValidate extends Validate
{
    // 检查用户ID
    public function checkGoodsId($value)
    {
        if(empty((new Goods)->find($value))){
            return false;
        }
        return true;
    }

    public function checkCateId($value)
    {
        if(empty((new Cart)->find($value))){
            return false;
        }
        return true;
    }


    public function checkAddressId($value)
    {
        if(empty((new Address)->find($value))){
            return false;
        }
        return true;
    }

   
}


?>